home *** CD-ROM | disk | FTP | other *** search
/ Champak 40 / Vol 40.iso / games / water_ba.swf / scripts / DefineSprite_78 / frame_1 / DoAction.as
Text File  |  2007-03-20  |  920b  |  51 lines

  1. textz.onEnterFrame = function()
  2. {
  3.    if(!this.init)
  4.    {
  5.       this.originy = this._y;
  6.       this.init = true;
  7.    }
  8.    if(this._y < 10 and this._y > -1220)
  9.    {
  10.       switch(this.dir)
  11.       {
  12.          case 1:
  13.             this._y -= 2;
  14.             break;
  15.          case 2:
  16.             if(this._y < 0)
  17.             {
  18.                this._y += 2;
  19.             }
  20.       }
  21.    }
  22.    else
  23.    {
  24.       this._y = this.originy;
  25.    }
  26. };
  27. arrowdown.onRollOver = function()
  28. {
  29.    _root.cursorz.gotoAndStop(3);
  30.    textz.dir = 1;
  31.    this.gotoAndStop(2);
  32. };
  33. arrowdown.onRollOut = function()
  34. {
  35.    this.gotoAndStop(1);
  36.    _root.cursorz.gotoAndStop(1);
  37.    textz.dir = 3;
  38. };
  39. arrowup.onRollOver = function()
  40. {
  41.    this.gotoAndStop(2);
  42.    _root.cursorz.gotoAndStop(3);
  43.    textz.dir = 2;
  44. };
  45. arrowup.onRollOut = function()
  46. {
  47.    this.gotoAndStop(1);
  48.    _root.cursorz.gotoAndStop(1);
  49.    textz.dir = 3;
  50. };
  51.